<!--
  Generated template for the MorePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

    <ion-navbar>
      <ion-title>更多</ion-title>
    </ion-navbar>
  
  </ion-header>
  
  <ion-content>
    <div *ngIf="notLogin">
      <ion-card>
        <ion-card-header text-center>
          登录 iMoocQA，体验更多功能
        </ion-card-header>
        <ion-card-content text-center>
          <button ion-button outline small (click)="showModal()">登录/注册</button>
        </ion-card-content>
      </ion-card>
    </div>
  
    <div *ngIf="logined">
      <ion-list class="marginTop">
        <button ion-item (click)="gotoUserPage()">
          <ion-avatar item-start>
            <img src="{{headface}}" />
          </ion-avatar>
          <h2>{{userinfo.UserNickName}}</h2>
          <p>查看个人主页或编辑简介</p>
        </button>
      </ion-list>
      <ion-list class="marginTop">
        <ion-list-header>
          设置
        </ion-list-header>
        <ion-item>
          <ion-icon name="cloudy-night" item-start color="purple"></ion-icon>
          <ion-label>夜间模式</ion-label>
          <ion-toggle color="purple" (ionChange)="toggleChangeTheme()"></ion-toggle>
        </ion-item>
        <button ion-item (click)="gotoScanQrcode()">
          <ion-icon name="qr-scanner" item-start color="danger"></ion-icon>
          <ion-label>扫描二维码</ion-label>
        </button>
        <button ion-item (click)="gotoVersions()">
          <ion-icon name="help-circle" item-start color="dark"></ion-icon>
          <ion-label>关于</ion-label>
        </button>
      </ion-list>
    </div>
  </ion-content>